package sample.service;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author yqyc
 * @date 2020/4/16 扩展用户信息
 */
public class SiteUser extends User {

	/** 用户ID */
	@Getter
	@Setter
	private Long id;

	public SiteUser() {
		super(null, null, null);
	}
	public SiteUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, authorities);
	}

	public SiteUser(Long id, String userName, String password,
					Collection<? extends GrantedAuthority> authorities) {
		super(userName, password, authorities);
		this.id = id;
	}

//	public SiteUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
//		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
//	}


}
